home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 8 / 008.d81 / spelling drill (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  6KB  |  206 lines

  1. 1 rem *** spelling drill            ***
  2. 2 rem *** an original program by    ***
  3. 3 rem *** donna k. woody            ***
  4. 10 poke53272,23:printchr$(8)
  5. 15 dimw$(25),s1$(25),s2$(25),s3$(25),an$(25),d(25):s=65520
  6. 20 poke53280,5:poke53281,1:printchr$(31)
  7. 25 poke783,peek(783)and254:printchr$(14):printchr$(8)
  8. 30 goto180
  9. 40 poke783,peek(783)and254:poke781,6:poke782,0:syss
  10. 50 forx=1to640:print" ";:next:return
  11. 177 :
  12. 178 rem *** title page              ***
  13. 179 :
  14. 180 printchr$(147)
  15. 185 poke783,peek(783)and254
  16. 190 poke781,5:poke782,13:syss:print"[211][208][197][204][204][201][206][199] [196][210][201][204][204]"
  17. 200 poke781,8:poke782,19:syss:print"by"
  18. 205 poke781,11:poke782,13:syss:print"[196]onna [203]. [215]oody"
  19. 210 poke781,23:poke782,3:syss:print"[215]ould you like instructions (y/n)?[160]";:
  20. 220 poke198,0:wait198,1:geta$:ifa$<>"y"anda$<>"n"anda$<>"[217]"anda$<>"[206]"then220
  21. 230 ifa$="y"ora$="[217]"thengosub5000:rem * instructions *
  22. 240 printchr$(147)
  23. 242 gosub11000:rem * choose file *
  24. 244 gosub10000:ifcz=62then242
  25. 245 poke781,10:poke782,0:syss:print"[208]lease wait......."
  26. 247 print:print"[204]oading file......."
  27. 248 open15,8,15
  28. 250 open4,8,4,"0:"+fi$+",seq,read"
  29. 270 input#4,nu
  30. 280 fori=1tonu
  31. 290 input#4,w$(i),s1$(i),s2$(i),s3$(i),an$(i)
  32. 300 nexti
  33. 302 close4:close15
  34. 303 gosub11100
  35. 304 gosub11200
  36. 306 ifflag=1thenflag=0:goto11300
  37. 311 r=o:i=0
  38. 312 fori=1tonu
  39. 314 printchr$(147):printtab(12)"[211][208][197][204][204][201][206][199][160][196][210][201][204][204]"
  40. 315 printchr$(19):poke781,2:poke782,28:syss:printr"/"i-1
  41. 320 forz=1to40:print"=";:next
  42. 332 poke781,4:poke782,13:syss:print"definition #"i:print
  43. 334 printw$(d(i)):print
  44. 340 print" [193]. "s1$(d(i)):print
  45. 350 print" [194].[160]"s2$(d(i)):print
  46. 360 print" [195]. "s3$(d(i)):print
  47. 370 poke781,15:poke782,0:syss:print" -->[160]";
  48. 380 poke198,0:wait198,1:geta$
  49. 385 ifa$<>"a"anda$<>"b"anda$<>"c"anda$<>"[193]"anda$<>"[194]"anda$<>"[195]"then370
  50. 386 printa$
  51. 387 ifa$="[193]"thena$="a"
  52. 388 ifa$="[194]"thena$="b"
  53. 389 ifa$="[195]"thena$="c"
  54. 430 printchr$(144)
  55. 432 ifa$=an$(d(i))thenwr$="[210][201][199][200][212]!!!"
  56. 434 ifa$<>an$(d(i))thenwr$="[215][210][207][206][199]!"
  57. 436 poke781,18:poke782,10:syss:print"          [157][157][157][157][157][157][157][157][157][157]"wr$
  58. 440 ifa$=an$(d(i))then485
  59. 480 poke781,20:poke782,0:syss:print"[195]orrect answer is "an$(d(i))
  60. 485 ifa$=an$(d(i))thenr=r+1
  61. 490 ifa$<>an$(d(i))thenprint""
  62. 492 printchr$(31)
  63. 500 poke781,23:poke782,1:syss:print"[208]ress [211][208][193][195][197] [194][193][210] to continue.";:
  64. 510 poke198,0:wait198,1:geta$:ifa$<>" "then510
  65. 520 poke781,18:poke782,10:syss:print"            "
  66. 530 nexti
  67. 600 printchr$(147):printtab(13)"[211][208][197][204][204][201][206][199][160][196][210][201][204][204]"
  68. 605 pc=int((r/nu)*100)
  69. 610 ifpc>=90thenprintchr$(144)
  70. 620 poke781,3:poke782,0:syss:print"90% - 100% -- [197]xcellent! ":printchr$(31)
  71. 630 ifpc>=70andpc<90thenprintchr$(144)
  72. 640 poke781,5:poke782,0:syss:print"70% - 80% -- [214]ery good!":printchr$(31)
  73. 650 ifpc>=60andpc<70thenprintchr$(144)
  74. 660 poke781,7:poke782,0:syss:print"60% - 70% -- [198]air":printchr$(31)
  75. 680 ifpc>=50andpc<60thenprintchr$(144)
  76. 690 poke781,9:poke782,0:syss:print"50% - 60% -- [206]ot too good"
  77. 700 printchr$(31)
  78. 710 ifpc<50thenprintchr$(144)
  79. 720 poke781,11:poke782,0:syss:print" 0% - 50% -- [215]e know you didn't cheat"
  80. 730 printchr$(31)
  81. 810 poke781,20:poke782,0:syss:print"[208]ress <[210]> to repeat the test."
  82. 820 print"[208]ress <[204]> to go back to [204][207][193][196][211][212][193][210].":print"[208]ress <[193]> for another test."
  83. 830 poke198,0:wait198,1:geta$:ifa$<>"r"anda$<>"l"anda$<>"a"then830
  84. 835 ifa$<>"r"anda$<>"l"anda$<>"a"anda$<>"[210]"anda$<>"[204]"anda$<>"[193]"then810
  85. 840 ifa$="r"ora$="[210]"thenprintchr$(147):goto311
  86. 845 ifa$="a"ora$="[193]"thenprintchr$(147):goto240
  87. 850 ifa$="l"ora$="[204]"thenprintchr$(147):goto63000
  88. 4999 :
  89. 5000 rem *** instructions          ***
  90. 5001 :
  91. 5010 fori=1to2
  92. 5015 printchr$(147)
  93. 5020 forj=1to10
  94. 5030 reada$:printa$:print
  95. 5040 nextj
  96. 5050 poke781,23:poke782,6:syss:print"press space bar to continue";
  97. 5060 poke198,0:wait198,1:geta$:ifa$<>" "then5060
  98. 5070 nexti
  99. 5080 return
  100. 6000 data"  [215]elcome to [211][208][197][204][204][201][206][199][160][196][210][201][204][204]!  [206]ot only"
  101. 6005 data"will you learn how to spell, but you'll"
  102. 6007 data"also increase your vocabulary!"
  103. 6010 data"  [200]ere are some of the words that seem"
  104. 6012 data"to give everyone a lot of trouble.  [215]e"
  105. 6015 data"are also going to include some words"
  106. 6020 data"you may not have heard of before, just"
  107. 6022 data"to keep things interesting!"
  108. 6025 data"  [217]ou will be given a definition of a"
  109. 6030 data"word and three possible spellings."
  110. 6031 data"choose the spelling you think (or know)"
  111. 6032 data"is right.  [193]nswers are entered with a"
  112. 6033 data"single keystroke.  [217]ou do not need to"
  113. 6034 data"press the <[210][197][212][213][210][206]> key."
  114. 6046 data"  [217]our score is shown in the upper"
  115. 6047 data"right-hand corner.  [193]fter the test is"
  116. 6048 data"over, you will be given a score based"
  117. 6049 data"on the number of questions you answered"
  118. 6050 data"correctly."
  119. 6052 data"         [200]ave fun and good luck!"
  120. 9997 :
  121. 9998 rem *** check for file          ***
  122. 9999 :
  123. 10000 open15,8,15
  124. 10005 open4,8,4,"0:"+fi$+",seq,read":close4
  125. 10010 print#15,cz,mz$,sz,tz:close15
  126. 10020 ifcz=0thenreturn
  127. 10030 ifcz=62thenprintchr$(147):print"[212]hat file does not exist on this disk."
  128. 10040 print:print:print"[196]o you want to continue (y/n)?[160]";:poke198,0:wait198,1:ge
  129. 10050 ifa$="y"ora$="[217]"thenprintchr$(147):return
  130. 10060 ifa$="n"ora$="n"thenprintchr$(147):end
  131. 10070 print"[145][145][145][145]":goto10040
  132. 10997 :
  133. 10998 rem *** choose file           ***
  134. 10999 :
  135. 11000 printchr$(147):print:printtab(13)"[211][208][197][204][204][201][206][199][160][196][210][201][204][204]":print:print:print
  136. 11002 pc=0:r=0
  137. 11005 print:print"     0.  [197]xit program"
  138. 11010 print:print"     1.  [211]pelling [215]ords #1"
  139. 11020 print:print"     2.  [211]pelling [215]ords #2"
  140. 11040 print:print:print" [197]nter selection (0 - 2) ";:poke198,0:wait198,1:geta$
  141. 11050 ifa$="0"then 63000
  142. 11060 ifa$="1"then fi$="words.1":printchr$(147):goto11095
  143. 11070 ifa$="2"then fi$="words.2":printchr$(147):goto11095
  144. 11090 poke781,12:poke782,0:syss:goto11040
  145. 11095 return
  146. 11100 forx=1tonu:d(x)=x:next
  147. 11110 fori=1tonu:d%=(rnd(1)*nu)+1:dt=d(i):d(i)=d(d%):d(d%)=dt:next
  148. 11120 return
  149. 11197 :
  150. 11198 rem *** print?               ***
  151. 11199 :
  152. 11200 printchr$(147)
  153. 11210 poke781,5:poke782,0:syss
  154. 11215 print"[196]o you want [211][208][197][204][204][201][206][199] [196][210][201][204][204] printed out  (y/n)?[160]";:
  155. 11220 poke198,0:wait198,1:geta$
  156. 11230 ifa$="[217]"ora$="y"thenflag=1:goto11260
  157. 11240 ifa$="[206]"ora$="n"thenflag=0:goto11260
  158. 11250 poke781,22:poke782,1:syss:print"[208]lease answer 'y' or 'n'.":goto11210
  159. 11260 return
  160. 11297 :
  161. 11298 rem *** print drill          ***
  162. 11299 :
  163. 11300 printchr$(147)
  164. 11310 print"[205]ake sure your printer is correctly     hooked up to your computer."
  165. 11320 print:print
  166. 11330 print"[204]ine up the paper at the top of the     page."
  167. 11340 print:print
  168. 11350 print"[212]urn on your printer."
  169. 11360 print:print
  170. 11370 print"[208]ress <f1> function key when you are    ready to print."
  171. 11380 poke198,0:wait198,1:geta$
  172. 11390 ifasc(a$)<>133then11380
  173. 11400 open4,4,7:cmd4
  174. 11410 print"[211][208][197][204][204][201][206][199][160][196][210][201][204][204]"
  175. 11420 print:print"[206][193][205][197]:                                   [196][193][212][197]:":print:print
  176. 11425 c1=6:p=2
  177. 11430 fori=1tonu
  178. 11435 print"[209]uestion #"i
  179. 11440 printw$(d(i))
  180. 11450 print" [193]. "s1$(d(i))
  181. 11460 print" [194].[160]"s2$(d(i))
  182. 11470 print" [195]. "s3$(d(i))
  183. 11480 print"[193]nswer is -->[160]"
  184. 11485 c1=c1+7:ifc1>=62thenc1=3:print:print:print:print:print"[208]age "p:p=p+1
  185. 11490 print:next
  186. 11495 print#4
  187. 11500 close4
  188. 11505 printchr$(147)
  189. 11510 print"[204]ine up the paper at the top of the     page for the answers."
  190. 11520 print:print
  191. 11530 print"[212]urn on your printer."
  192. 11540 print:print
  193. 11550 print"[208]ress <f1> function key when you are    ready to print."
  194. 11560 poke198,0:wait198,1:geta$
  195. 11570 ifasc(a$)<>133then11560
  196. 11575 open4,4,7:cmd4
  197. 11580 print"[21